#!/bin/bash
# Zaitan Module - Vmware Install
# Zaitan Team <http://zaitan.net/>

RMOD_ENGINE='4.0'
RMOD_CATEGORY='Software'
RMOD_SUBCATEGORY='Servers'
RMOD_NAME='Vmware'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='1.0.4'
RMOD_DESCRIPTION='Installs Vmware'
md5sum='853247ff0e313f34bd0c3052de8e2c28'


# Install Vmware

echo Running $RMOD_NAME...
#/usr/lib/zaitan/modulo/mod-checkInstall

zenity --info --text="Anote o numero do serial do vmware
## Your serial number(s):
9C5AD-Y0A8G-2E14K-4L2KJ"&


cd /usr/share/zaitan
apt-get update
apt-get -y install linux-headers-`uname -r` build-essential
apt-get -y install xinetd


wget -c http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update114.tar.gz
wget -c http://download3.vmware.com/software/vmserver/VMware-server-1.0.4-56528.tar.gz

tar xzvf VMware-server-1.0.4-56528.tar.gz

cd vmware-server-distrib
sudo ./vmware-install.pl

echo "Se apos a instalação aparecer algum erro nao se preucupe, aguarde ate a finalizaçao do script" && sleep 5


cd ..
tar xzvf vmware-any-any-update114.tar.gz
cd vmware-any-any-update114
sudo ./runme.pl

sudo apt-get -f install


echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##

exit 0
